package cn.qu.netty.boot;

import java.util.List;

public class FilterProvider {

	private ApplicationContext applicationContext;
	
	private List<OncePerRequestFilter> perFilters;
	
	private List<OnceAfterRequestFilter> aftFilters;

	public FilterProvider(ApplicationContext applicationContext) {
		this.applicationContext = applicationContext;
		this.init();
	}
	
	private void init() {
		this.perFilters = applicationContext.getBean(OncePerRequestFilter.class);
		this.aftFilters = applicationContext.getBean(OnceAfterRequestFilter.class);
	}

	public List<OncePerRequestFilter> getPer() {
		return perFilters;
	}

	public List<OnceAfterRequestFilter> getAft() {
		return aftFilters;
	}

}
